From 71ad9a8fdd8aaa9019e05de58b38253da02b1b2e Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Sat, 5 Mar 2011 03:03:45 -0500 Subject: [PATCH] notebook: render a frame and background in the header And use the "header" style class to do that. This allows themes to set e.g. the background of the tab header differently. Themes will need slight adjustment to make things appear as before. https://bugzilla.gnome.org/show_bug.cgi?id=643914 --- gtk/gtknotebook.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 27880c49f9..f008101475 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -5163,6 +5163,14 @@ gtk_notebook_paint (GtkWidget *widget, else page = priv->cur_page; + gtk_style_context_save (context); + gtk_style_context_add_class (context, GTK_STYLE_CLASS_HEADER); + gtk_render_background (context, cr, + x, y, width, page->allocation.height); + gtk_render_frame (context, cr, + x, y, width, page->allocation.height); + gtk_style_context_restore (context); + switch (tab_pos) { case GTK_POS_TOP: -- 2.30.2